package vcp.gui.forms;

import java.awt.event.ActionListener;
import java.util.Observable;
import java.util.Observer;

import vcp.common.IView;
import vcp.gui.components.VCPPanel;

import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JLabel;

/**
 * Temporary Check In Form
 *
 */
public class TemporaryCheckInForm extends VCPPanel implements Observer,IView{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JTextField userIdField;
	private JTextField carNumberField;
	private JButton btnCheackIn;
	
	//btnCheackIn
	public TemporaryCheckInForm() {
		setLayout(null);
		
		userIdField = new JTextField();
		userIdField.setBounds(287, 75, 86, 20);
		add(userIdField);
		userIdField.setColumns(10);
		
		JButton btnCheackIn = new JButton("Cheack In");
		btnCheackIn.setBounds(179, 219, 89, 23);
		add(btnCheackIn);
		
		JLabel lblNewLabel = new JLabel("User Id");
		lblNewLabel.setBounds(71, 78, 46, 14);
		add(lblNewLabel);
		
		carNumberField = new JTextField();
		carNumberField.setBounds(287, 135, 86, 20);
		add(carNumberField);
		carNumberField.setColumns(10);
		
		JLabel lblCarNumber = new JLabel("Car Number");
		lblCarNumber.setBounds(70, 138, 69, 14);
		add(lblCarNumber);
	}
	
	

	@Override
	public void addController(Object obj) {
		btnCheackIn.addActionListener((ActionListener)obj);
		btnCheackIn.setActionCommand("TempCheackIn");
	}

	@Override
	public void update(Observable o, Object arg) {
		// TODO Auto-generated method stub
	}
	
	public JTextField getUserIdField() {
		return userIdField;
	}

	public void setUserIdField(JTextField userIdField) {
		this.userIdField = userIdField;
	}

	public JTextField getCarNumberField() {
		return carNumberField;
	}

	public void setCarNumberField(JTextField carNumberField) {
		this.carNumberField = carNumberField;
	}

	public JButton getBtnCheackIn() {
		return btnCheackIn;
	}

	public void setBtnCheackIn(JButton btnCheackIn) {
		this.btnCheackIn = btnCheackIn;
	}
	

}
